package com.toby.dao;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Repository;

/**
 * @desc: 用户dao
 * @author: toby
 * @date: 2019/10/8 22:21
 */
@Repository
public class UserDao {
    @Autowired
    private JdbcTemplate jdbcTemplate;

    public int addUser(String name,int sex,String address) {
        String sql = "insert into t_user(name,sex,address) value(?,?,?)";
        return jdbcTemplate.update(sql,name,sex,address);
    }
}
